<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv=X-UA-Compatible content=IE=8/>

    <title>蘑菇街</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/normalize.css" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/Home/css/font-awesome.min.css"  type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/Home/css/bootstrap.css" type="text/css"/>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" type="text/css"/>



    <link rel="stylesheet" href="__PUBLIC__/Home/css/index.css" type="text/css" />
    <script>
        var Public = "__PUBLIC__";
    </script>
    <script src="__PUBLIC__/Home/js/jquery-1.7.2.js" ></script>
    <script src="__PUBLIC__/Home/js/jquery-1.11.3.js" ></script>
    <script src="__PUBLIC__/Home/js/bootstrap.min.js" ></script>
    <script src="__PUBLIC__/Home/js/jQueryRotate.js" ></script>
    <script src="__PUBLIC__/Home/js/snowfall.jquery.js"></script>
    <script src="__PUBLIC__/layui/layui.js" ></script>

</head>
<body>

<!--头部导航栏开始-->
<div class="header-nav">
    <div class="header-wrap">
        <a class="mgj-home" href="{{:U('Index/index')}}">商城首页</a>
        <ul class="header-wrap-nav">
            <if condition="empty($_SESSION['home'])">
                <li class="login header-item">
                    <a href="{{:U('User/register')}}">注册</a>
                    <a href="{{:U('User/login')}}" id="login">登录</a>
                </li>
            <else/>
                <li class="login header-item">
                    <a href="#">
                        <if condition="empty($_SESSION['home']['user_img'])">
                            <img src="__PUBLIC__/Home/images/head.png" style="height: 24px;display: inline-block;border-radius: 12px">
                        <else/>
                            <img src="{{:get_img_url('__ROOT__/Uploads/user',$_SESSION['home']['user_img'],50)}}" style="height: 24px;display: inline-block;border-radius: 12px">
                        </if>

                    </a>
                    <a href="{{:U('Usercenter/index')}}">{{$Think.session.home.name}}</a>
                    <a href="{{:U('User/out')}}">退出</a>
                </li>
            </if>

            <li class="order header-item">
                <a href="{{:U('Usercenter/myOrder')}}">我的订单</a>
            </li>
            <li class="cart header-item"id="cart">
                <a href="{{:U('User/cart')}}">购物车</a>
                <div class="empty-cart">购物车里没有商品</div>

            </li>


        </ul>
    </div>
</div>
<!--头部导航栏结束-->

<block name="register">

<!--侧边菜单栏开始-->
<div class="mgj_rightbar" data-ptp="_sidebar" style="right: 0px;">
    <!--空的右侧边栏-->
    <div id="mgj_rightbar_top_blank" class="mgj_rightbar_960"></div>
    <!--方便定margin的空dediv-->
    <div id="mgj_rightbar_blank_div"></div>
    <!--购物车-->
    <div id="my-cart"class="sidebar-item mgj-my-cart" data-label="1"style="left: 0px;">
        <a href="{{:U('User/cart')}}" >
            <!--<i class="s-icon"></i>-->
            <div class="s-txt">购物车</div>
            <div class="num" style="display: none;"></div>
        </a>
    </div>
    <!--优惠券-->
    <div class="sidebar-item mgj-my-coupon" data-label="1"id="my-coupon">
        <a   href="#">
            <!--<i class="s-icon"></i>-->
            <div class="s-txt">优惠券</div>
            <div class="num"></div>
        </a>
    </div>
    <!--个人中心-->
    <div class="sidebar-item mgj-my-wallet"id="my-wallet"data-label="1">
        <a  href="{{:U('Usercenter/index')}}">
            <!--<i class="s-icon"></i>-->
            <div class="s-txt">个人中心</div>
        </a>
    </div>
    <!--我的订单-->
    <div class="sidebar-item mgj-my-browserlog" id="my-browserlog"data-label="1">
        <a   href="{{:U('Usercenter/myOrder')}}">
            <!--<i class="s-icon"></i>-->
            <div class="s-txt">我的订单</div>
        </a>
    </div>
    <div class="sideBottom clearfix" id="sideBottom"style="display:none;">
        <!--回到顶部-->
        <div class="sidebar-item mgj-back2top" data-label="1"style="left: 0px;">
            <a  href="javascript:;">
                <i class="s-icon"></i>
            </a>
        </div>
    </div>
</div>
<!--侧边菜单栏结束-->



<!--头部搜索开始-->
<div class="header-mid">
    <div class="header-mid-wrap">
        <a href="#" >
            <img  id="s1111-logo"src="__PUBLIC__/Home/images/1111_220x90.gif"  alt="该链接已失效">
        </a>
        <div class="search-content">
            <div class="top_nav_search">
                <div class="search-inner-box">
                    <div id="select-box-1"class="select-box">
                        <span class="selected">搜商品</span>
                        <ol>
                            <li class="current"data-index="goods">
                                <a href="#">商品</a>
                            </li>
                            <li data-index="store">
                                <a href="#">店铺</a>
                            </li>
                        </ol>
                    </div>
                    <form action="{{:U('Search/index')}}" method="get" id="top_nav_form">
                        <input data-tel="search_book" name="q1" class="ts_txt fl" data-def="睡衣女冬" value="" autocomplete="off" def-v="韩版可爱秋冬季睡衣套装" type="text">
                        <input value="搜  索" class="ts_btn" type="submit">
                        <!--<input name="t" value="bao" id="select_type" type="hidden">-->
                        <!--<input name="ptp" value="" type="hidden">-->
                    </form>
                    <div id="top-search-hint"class="top_search_hint is-not-ie8-hack" >
                        <div class="search_tip_box fl">
                            <div class="mr300 tip_wrap">
                                <h3 class="search_tip_title local_title clearfix">历史记录</h3>
                                <ul class="search_tip"></ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="ts_hotwords">
                        <php>$num=0;</php>
                        <foreach name="cateList" item="value" key="key">
                            <php>$num++;</php>
                            <if condition="$num lt 9">
                                <a href="{{:U('Index/categoryDetails',array('id'=>$value['id']))}}" class="ts_hotword">{{$value.name}}</a>
                            </if>
                        </foreach>
                </div>
            </div>
        </div>
        <div class="header-mid-qrcode">
            <img src="__PUBLIC__/Home/images/qrcode.png" alt="该链接已失效">
        </div>
    </div>
    <block name="top-2">
    <div class="col-md-12">
        <div class="container">
            <div class="col-md-3"style="margin-left: -86px;background-image:url(__PUBLIC__/Home/images/top.png);background-repeat:no-repeat;background-position-x:center;height:40px;padding-top: 5px">
                <a  style="color: #ffffff"><h4 class="text-center">商品分类</h4></a></div>
            <div class="col-md-3"style="padding-top: 5px"><a href="{{:U('Seckill/index')}}" class="top"><h4 class="text-center">限时快抢</h4></a></div>
            <div class="col-md-3"style="padding-top: 5px"><a href="{{:U('Group/index')}}" class="top"><h4 class="text-center">省钱团购</h4></a></div>
        </div>
    </div>
</div>


<!--头部搜索结束-->
<!--头部轮播图开始-->
<div class="header-banner clearfix"id="header-banner"style="background:#FF9003;">
    <div class="banner-wrap clearfix">

        <div class="nav-aside-menu">
            <div class="pc-indexPage-nav-menu fl" id="banner-nav-menu">
                <ul class="nav-list" id="more-banner-list">
                    <foreach name="topCate" item="item">
                        <li class="nav-li nav-li-first" >
                            <dl class="nav-wrap">
                                <dt>
                                    <a  class="catagory" href="{{:U('Index/categoryDetails',array('id'=>$item['id']))}}">{{$item.name}}</a>
                                </dt>
                                <dd>
									<span>
                                        <php>$i=0;</php>
                                        <foreach name="cateList" item="value">
                                            <if condition="$item['id'] eq $value['pid']">
                                                <php>$i++;</php>
                                                <!--控制侧边栏的a标签数小于等于3-->
                                                <if condition="$i elt 3">
                                                    <a  class="first"  href="{{:U('Index/categoryDetails',array('id'=>$value['id']))}}">{{$value.name}}</a>
                                                </if>

                                            </if>
                                        </foreach>
									</span>
                                </dd>
                            </dl>
                            <div data-ban="ban-menu"class="nav-more"style="display:none;">
                                <h2>
                                    <a   href="{{:U('Index/categoryDetails',array('id'=>$item['id']))}}">{{$item.name}}</a>
                                </h2>
                                <dl class="nav-more-wrap">
                                    <dt>

                                    </dt>
                                    <dd class="more-list">
                                        <foreach name="cateList" item="value">
                                            <if condition="$item['id'] eq $value['pid']">
                                                <a  href="{{:U('Index/categoryDetails',array('id'=>$value['id']))}}" style="color:#999">{{$value.name}}</a>
                                            </if>
                                        </foreach>
                                    </dd>
                                </dl>
                            </div>
                        </li>
                    </foreach>
                </ul>
            </div>
        </div>
        <div id="banner-box"class="banner-box clearfix">
            <div class="banner-button">
                <ul>
                    <li data-bi="1">
                        <img data-btn="1"src="__PUBLIC__/Home/banner/button.png" alt="123">
                    </li>
                    <li data-bi="2">
                        <img data-btn="2"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                    <li data-bi="3">
                        <img data-btn="3"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                    <li data-bi="4">
                        <img data-btn="4"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                    <li data-bi="5">
                        <img data-btn="5"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                    <li data-bi="6">
                        <img data-btn="6"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                    <li data-bi="7">
                        <img data-btn="7"src="__PUBLIC__/Home/banner/button.png" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/button.png" alt="">
                    </li>
                </ul>
            </div>
            <div class="banner-img"id="banner-img">
                <a href="javascript:void(0);"data-bi="1"style="display: block;">
                    <img src="__PUBLIC__/Home/banner/1.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/1.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="2">
                    <img src="__PUBLIC__/Home/banner/2.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/2.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="3">
                    <img src="__PUBLIC__/Home/banner/3.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/3.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="4">
                    <img src="__PUBLIC__/Home/banner/4.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/4.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="5">
                    <img src="__PUBLIC__/Home/banner/5.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/5.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="6">
                    <img src="__PUBLIC__/Home/banner/6.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/6.jpg" alt="">
                </a>
                <a href="javascript:void(0);"data-bi="7">
                    <img src="__PUBLIC__/Home/banner/7.jpg" tppabs="http://yanshi.sucaihuo.com/modals/25/2534/demo/banner/7.jpg" alt="">
                </a>
            </div>
        </div>

    </div>
</div>
<!--头部轮播结束-->

<!--主体部分开始-->
<div class="container">
    <!--顶级分类-->
    <foreach name="topCate" item="item">
        <h1 class="text-center text-danger" style="border-bottom: 3px solid #A94442;padding-bottom: 10px">{{$item.name}}</h1>
        <div class="row mt20">
            <!--每个顶级分类的子类-->
            <foreach name="cateList" item="value">
                <!--顶级分类的id是子类的pid-->
                <if condition="$item['id'] eq $value['pid']">
                    <!--<div class="col-sm-12 col-md-12">-->
                        <!--<a href="{{:U('Index/categoryDetails',array('id'=>$value['id']))}}"><h4>{{$value.name}}</h4></a>-->
                        <!--<br>-->
                    <!--</div>-->
                    <!--每个子类最多显示四件商品-->
                    <php>$j=0;</php>
                    <foreach name="goodsList" item="val">
                        <!--商品的category_id等于子分类的id-->
                        <if condition="$value['id'] eq $val['category_id']">
                            <if condition="$j elt 3">
                                <php>$j++;</php>
                                <div class="col-sm-6 col-md-3">
                                    <div class="thumbnail">
                                        <a href="{{:U('Index/goodsDetails',array('id'=>$val['id']))}}"><img src="{{:get_img_url('__ROOT__/Uploads/GoodsImg/',$val['img'],350)}}"></a>
                                        <div class="caption">
                                            <a href="{{:U('Index/goodsDetails',array('id'=>$val['id']))}}"><h3>{{:subtext($val['name'],15)}}</h3></a>

                                            <h2 class="text-danger">
                                                <span class="glyphicon glyphicon-jpy h2"></span>&nbsp;{{$val.price}}</h2>
                                            <!--<br>-->
                                            <!--<p><a href="#" class="btn btn-danger" role="button">立即购买</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="btn btn-primary" role="button">加入购物车</a></p>-->
                                        </div>
                                    </div>
                                </div>
                            </if>
                        </if>
                    </foreach>
                </if>
            </foreach>
        </div>
    </foreach>

</div>
<!--主体部分结束-->

</block>
</block>
<!--页脚开始-->
<div class="footer clearfix">
    <div class="footer-wrap">
        <!--左边开始-->
        <div class="footer-info">
            <a href="#">
                <img src="__PUBLIC__/Home/images/logo.png" alt="">
            </a>
            <div class="footer-info-text">
                <p>
                    营业执照注册号：
                    <a  href="#" >330106000129004</a>
                </p>
                <p>
                    增值电信业务经营许可证：
                    <a   href="#">浙B2-20110349</a>
                </p>
                <p style="height: auto">
                    网络文化经营许可证：
                    <a   href="#">浙网文（2016）0349-219号</a>
                </p>
                <p>
                    <a   href="#">安全责任书</a>
                </p>
                <p>
                    <a  href="#" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
                        <img src="__PUBLIC__/Home/images/jinghui_20x20.png"style="float:left;">
                        <span style="color: #999;">&nbsp;浙公网安备 33010602002329号</span>
                    </a>
                </p>
                <p class="mogujiecom">©2016 Mogujie.com 杭州卷瓜网络有限公司</p>
            </div>
        </div>
        <!--左边结束-->

        <!--中间开始-->
        <div class="footer-link">
            <dl>
                <dt>公司</dt>
                <dd><a href="#">关于我们</a></dd>
                <dd><a href="#">招聘信息</a></dd>
                <dd><a href="#">联系我们</a></dd>
            </dl>
            <dl>
                <dt>消费者</dt>
                <dd><a href="#">消费者服务</a></dd>
                <dd><a href="#">意见反馈</a></dd>
                <dd><a href="#">手机版下载</a></dd>
            </dl>
            <dl>
                <dt>商家</dt>
                <dd><a href="#">商家入驻</a></dd>
                <dd><a href="#">商家后台</a></dd>
                <dd><a href="#">蘑菇商学院</a></dd>
                <dd><a href="#">商家社区 </a></dd>
            </dl>
        </div>
        <!--中间结束-->

        <!--右边开始-->
        <div class="link-safe">
            <dl>
                <dt>权威认证</dt>
                <dd class="bank">
                    <a href="#"></a>
                </dd>
                <dd class="web">
                    <a href="#"></a>
                </dd>
            </dl>
        </div>
        <!--右边结束-->
    </div>
</div>
<!--页脚结束-->
<script src="__PUBLIC__/Home/js/index.js" ></script>
</body>
</html>